async function validInTryCatch1() {
  try {
    return await Promise.resolve('try');
  } catch (e) {}
}

async function validInTryCatch2() {
  try {
    throw new Error('error');
  } catch (e) {
    return Promise.resolve('catch');
  }
}

async function validInTryCatch3() {
  try {
    throw new Error('error');
  } catch (e) {
    return await Promise.resolve('catch');
  } finally {
    console.log('cleanup');
  }
}

async function validInTryCatch4() {
  try {
    throw new Error('error');
  } catch (e) {
    throw new Error('error2');
  } finally {
    return Promise.resolve('finally');
  }
}

async function validInTryCatch5() {
  return Promise.resolve('try');
}

async function validInTryCatch6() {
  return 'value';
}

function test() {
  return 1;
}

async function test() {
  return 1;
}
const test = () => 1;

const test = async () => 1;

async function test() {
  return Promise.resolve(1);
}

async function test() {
  try {
    throw 'foo';
  } catch (e) {
    return Promise.resolve(1);
  }
}

async function test() {
  try {
    throw 'foo';
  } catch (e) {
    throw 'foo2';
  } finally {
    return Promise.resolve(1);
  }
}

async function test() {
  try {
    const one = await Promise.resolve(1);
    return one;
  } catch (e) {
    const two = await Promise.resolve(2);
    return two;
  } finally {
    console.log('cleanup');
  }
}